package com.qidianit.mes.pro.controller;

import com.qidianit.mes.pojo.Material;
import com.qidianit.mes.pojo.Result;
import com.qidianit.mes.pojo.pro.BomRelation;
import com.qidianit.mes.pro.service.BomRelationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: YKYB
 * @Date: 2025/9/25 18:18
 * @Description:
 */
@RestController
@RequestMapping("/bom")
public class BomRelationController {
    @Autowired
    private BomRelationService bomRelationService;

    @GetMapping("/page")
    public Result<BomRelation> page(@RequestParam(required = false) Long parentId,
                                    @RequestParam(defaultValue = "1") Integer pageNum,
                                    @RequestParam(defaultValue = "5") Integer pageSize) {
        return bomRelationService.selectList(parentId, pageNum, pageSize);
    }
}
